/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: YaoSC
 * @Date: 2019/09/26/9:38
 * @Description:
 */

package com.orhon.smartcampus.modules.student.inputMapper;


import java.util.Map;

import org.mapstruct.factory.Mappers;

import com.alibaba.fastjson.JSON;
import com.orhon.smartcampus.modules.student.gqlInputModel.GQLEclassRecordsInput;

public interface EclassRecordsInputMapper {

    EclassRecordsInputMapper MAPPER = Mappers.getMapper(EclassRecordsInputMapper.class);

    default GQLEclassRecordsInput mapInput(Map map){
        String json = JSON.toJSONString(map);
        GQLEclassRecordsInput input = JSON.parseObject(json , GQLEclassRecordsInput.class);
        return input;
    }

}